RustSearch.sys.mjs

class RustSearch.sys.JsonEngineMethod()

The list of possible submission methods for search engine urls.

RustSearch.sys.JsonEngineMethod.GET

GET

RustSearch.sys.JsonEngineMethod.POST

POST

class RustSearch.sys.JsonEngineUrl()

Defines an individual search engine URL. This is defined separately to types::SearchEngineUrl as various fields may be optional in the supplied configuration.

RustSearch.sys.JsonEngineUrl.base

The PrePath and FilePath of the URL. May include variables for engines which have a variable FilePath, e.g. {searchTerms} for when a search term is within the path of the url.

RustSearch.sys.JsonEngineUrl.method

The HTTP method to use to send the request (GET or POST). If the engine definition has not specified the method, it defaults to GET.

RustSearch.sys.JsonEngineUrl.params

The parameters for this URL.

RustSearch.sys.JsonEngineUrl.searchTermParamName

The name of the query parameter for the search term. Automatically appended to the end of the query. This may be skipped if {searchTerms} is included in the base.

class RustSearch.sys.JsonEngineUrls()

Reflects types::SearchEngineUrls, but using EngineUrl.

RustSearch.sys.JsonEngineUrls.search

The URL to use for searches.

RustSearch.sys.JsonEngineUrls.searchForm

The URL of the search engine homepage.

RustSearch.sys.JsonEngineUrls.suggestions

The URL to use for suggestions.

RustSearch.sys.JsonEngineUrls.trending

The URL to use for trending suggestions.

class RustSearch.sys.Other()

Other

class RustSearch.sys.RefinedSearchConfig()

Details of the search engines to display to the user, generated as a result of processing the search configuration.

RustSearch.sys.RefinedSearchConfig.appDefaultEngineId

The identifier of the engine that should be used for the application default engine. If this is undefined, an error has occurred, and the application should either default to the first engine in the engines list or otherwise handle appropriately.

RustSearch.sys.RefinedSearchConfig.appPrivateDefaultEngineId

If specified, the identifier of the engine that should be used for the application default engine in private browsing mode. Only desktop uses this currently.

RustSearch.sys.RefinedSearchConfig.engines

A sorted list of engines. Clients may use the engine in the order that this list is specified, or they may implement their own order if they have other requirements.

The application default engines should not be assumed from this order in case of future changes.

The sort order is:

  • Application Default Engine

  • Application Default Engine for Private Mode (if specified & different)

  • Engines sorted by descending SearchEngineDefinition.orderHint

  • Any other engines in alphabetical order (locale based comparison)

class RustSearch.sys.SearchApplicationName()

The list of possible application names that are currently supported.

RustSearch.sys.SearchApplicationName.FIREFOX

FIREFOX

RustSearch.sys.SearchApplicationName.FIREFOX_ANDROID

FIREFOX_ANDROID

RustSearch.sys.SearchApplicationName.FIREFOX_IOS

FIREFOX_IOS

RustSearch.sys.SearchApplicationName.FOCUS_ANDROID

FOCUS_ANDROID

RustSearch.sys.SearchApplicationName.FOCUS_IOS

FOCUS_IOS

class RustSearch.sys.SearchEngineClassification()

The list of acceptable classifications for a search engine.

RustSearch.sys.SearchEngineClassification.GENERAL

GENERAL

RustSearch.sys.SearchEngineClassification.UNKNOWN

UNKNOWN

class RustSearch.sys.SearchEngineDefinition()

A definition for an individual search engine to be presented to the user.

RustSearch.sys.SearchEngineDefinition.aliases

A list of aliases for this engine.

RustSearch.sys.SearchEngineDefinition.charset

The character set this engine uses for queries.

RustSearch.sys.SearchEngineDefinition.classification

The classification of search engine according to the main search types (e.g. general, shopping, travel, dictionary). Currently, only marking as a general search engine is supported. On Android, only general search engines may be selected as “default” search engines.

RustSearch.sys.SearchEngineDefinition.clickUrl

The url used for reporting clicks.

RustSearch.sys.SearchEngineDefinition.identifier

The identifier of the search engine. This is used as an internal identifier, e.g. for saving the user’s settings for the engine. It is also used to form the base telemetry id and may be extended by telemetrySuffix.

RustSearch.sys.SearchEngineDefinition.name

The user visible name of the search engine.

RustSearch.sys.SearchEngineDefinition.optional

This search engine is presented as an option that the user may enable. The application should not include these in the default list of the user’s engines. If not supported, it should filter them out.

RustSearch.sys.SearchEngineDefinition.orderHint

A hint to the order that this engine should be in the engine list. This is derived from the engineOrders section of the search configuration. The higher the number, the nearer to the front it should be. If the number is not specified, other methods of sorting may be relied upon (e.g. alphabetical).

RustSearch.sys.SearchEngineDefinition.partnerCode

The partner code for the engine. This will be inserted into parameters which include {partnerCode}. May be the empty string.

RustSearch.sys.SearchEngineDefinition.telemetrySuffix

Optional suffix that is appended to the search engine identifier following a dash, i.e. <identifier>-<suffix>. If it is an empty string no dash should be appended.

RustSearch.sys.SearchEngineDefinition.urls

The URLs associated with the search engine.

class RustSearch.sys.SearchEngineSelector()

SearchEngineSelector parses the JSON configuration for search engines and returns the applicable engines depending on their region + locale.

RustSearch.sys.SearchEngineSelector.clearSearchConfig()

Clears the search configuration from memory if it is known that it is not required for a time, e.g. if the configuration will only be re-filtered after an app/environment update.

RustSearch.sys.SearchEngineSelector.filterEngineConfiguration(userEnvironment)

Filters the search configuration with the user’s given environment, and returns the set of engines and parameters that should be presented to the user.

RustSearch.sys.SearchEngineSelector.setConfigOverrides(overrides)

setConfigOverrides

RustSearch.sys.SearchEngineSelector.setSearchConfig(configuration)

Sets the search configuration from the given string. If the configuration string is unchanged since the last update, the cached configuration is reused to avoid unnecessary reprocessing. This helps optimize performance, particularly during test runs where the same configuration may be used repeatedly.

RustSearch.sys.SearchEngineSelector.useRemoteSettingsServer(service, applyEngineOverrides)

Sets the RemoteSettingsService to use. The selector will create the relevant remote settings client(s) from the service.

# Params: - service: The remote settings service instance for the application. - options: The remote settings options to be passed to the client(s). - apply_engine_overrides: Whether or not to apply overrides from search-config-v2-overrides to the selected engines. Should be false unless the application supports the click URL feature.

class RustSearch.sys.SearchEngineUrl()

Defines an individual search engine URL.

RustSearch.sys.SearchEngineUrl.base

The PrePath and FilePath of the URL. May include variables for engines which have a variable FilePath, e.g. {searchTerms} for when a search term is within the path of the url.

RustSearch.sys.SearchEngineUrl.method

The HTTP method to use to send the request (GET or POST). If the engine definition has not specified the method, it defaults to GET.

RustSearch.sys.SearchEngineUrl.params

The parameters for this URL.

RustSearch.sys.SearchEngineUrl.searchTermParamName

The name of the query parameter for the search term. Automatically appended to the end of the query. This may be skipped if {searchTerms} is included in the base.

class RustSearch.sys.SearchEngineUrls()

The URLs associated with the search engine.

RustSearch.sys.SearchEngineUrls.search

The URL to use for searches.

RustSearch.sys.SearchEngineUrls.searchForm

The URL of the search engine homepage.

RustSearch.sys.SearchEngineUrls.suggestions

The URL to use for suggestions.

RustSearch.sys.SearchEngineUrls.trending

The URL to use for trending suggestions.

class RustSearch.sys.SearchUpdateChannel()

The list of possible update channels for a user’s build. Use default for a self-build or an unknown channel.

RustSearch.sys.SearchUpdateChannel.AURORA

AURORA

RustSearch.sys.SearchUpdateChannel.BETA

BETA

RustSearch.sys.SearchUpdateChannel.DEFAULT

DEFAULT

RustSearch.sys.SearchUpdateChannel.ESR

ESR

RustSearch.sys.SearchUpdateChannel.NIGHTLY

NIGHTLY

RustSearch.sys.SearchUpdateChannel.RELEASE

RELEASE

class RustSearch.sys.SearchUrlParam()

Parameter definitions for search engine URLs. The name property is always specified, along with one of value, experiment_config or search_access_point.

RustSearch.sys.SearchUrlParam.enterpriseValue

Same as value but only used if Services.polices.isEnterprise is true. Overrides other parameters of the same name.

RustSearch.sys.SearchUrlParam.experimentConfig

The value for the parameter will be derived from the equivalent experiment configuration value. Only desktop uses this currently.

RustSearch.sys.SearchUrlParam.name

The name of the parameter in the url.

RustSearch.sys.SearchUrlParam.value

The parameter value, this may be a static value, or additionally contain a parameter replacement, e.g. {inputEncoding}. For the partner code parameter, this field should be {partnerCode}.

class RustSearch.sys.SearchUserEnvironment()

The user’s environment that is used for filtering the search configuration.

RustSearch.sys.SearchUserEnvironment.appName

The application name that the user is using.

RustSearch.sys.SearchUserEnvironment.deviceType

The device type that the user is using.

RustSearch.sys.SearchUserEnvironment.distributionId

The distribution id for the user’s build.

RustSearch.sys.SearchUserEnvironment.experiment

The search related experiment id that the user is included within. On desktop this is the searchConfiguration.experiment variable.

RustSearch.sys.SearchUserEnvironment.locale

The current locale of the application that the user is using.

RustSearch.sys.SearchUserEnvironment.region

The home region that the user is currently identified as being within. On desktop & android there is a 14 day lag after detecting a region change before the home region changes. TBD: iOS?

RustSearch.sys.SearchUserEnvironment.updateChannel

The update channel of the user’s build.

RustSearch.sys.SearchUserEnvironment.version

The application version that the user is using.